package bb.lanxing.calc.calculator;

import bb.lanxing.calc.data.CrosstrainerPoint;
import android.util.Log;


public class CrosstrainerCalc {
    final static private String TAG = "CrosstrainerCalc";
    private CrosstrainerPoint lastCrosstrainerPoint;

    public void calc(CrosstrainerPoint crosstrainerPoint) {
        if (this.lastCrosstrainerPoint == null) {
            this.lastCrosstrainerPoint = crosstrainerPoint;
            return;
        }

        double crosstrainerspeed = crosstrainerPoint.getCrosstrainerSpeed();
        crosstrainerPoint.setCrosstrainerSpeed(crosstrainerspeed);

        int crosstrainerpower = crosstrainerPoint.getCrosstrainerPower();
        crosstrainerPoint.setCrosstrainerPower(crosstrainerpower);

        this.lastCrosstrainerPoint = crosstrainerPoint;
    }

    public void release() {
        this.lastCrosstrainerPoint = null;
    }
}
